package cn.sinata.wanglin.adapter;

import android.view.View;

import com.xilada.xldutils.adapter.HFRecyclerAdapter;
import com.xilada.xldutils.adapter.util.ViewHolder;
import com.xilada.xldutils.utils.TimeUtils;

import java.util.List;

import cn.sinata.wanglin.R;
import cn.sinata.wanglin.model.RepairRecord;

/**
 *
 * Created by liaoxiang on 16/12/24.
 */

public class RepairRecordAdapter extends HFRecyclerAdapter<RepairRecord> {
    public RepairRecordAdapter(List<RepairRecord> mData) {
        super(mData, R.layout.item_repair);
    }

    @Override
    public void onBind(int position, RepairRecord repairRecord, ViewHolder holder) {
        holder.bind(R.id.tv_villagename).setVisibility(View.GONE);
        holder.setText(R.id.tv_projectname, mContext.getString(R.string.repair_project,repairRecord.getProject()));
        holder.setText(R.id.tv_bespokeDate,mContext.getString(R.string.repair_bespokeDate, TimeUtils.getCurrentTimeMillisecond(repairRecord.getBespokeDate())));
    }
}
